/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.colswe.testingProject.control;

import java.util.Collection;
import javax.persistence.Persistence;
import org.colswe.testingProject.dao.ProgramDao;
import org.colswe.testingProject.entity.Program;

/**
 * Clase ProgramControl para el manejo de Program.
 *
 * @author andres
 */
public class ProgramControl {

    /**
     * Dao para el manejo de Program.
     */
    private ProgramDao dao;

    /**
     * Constructor de ProgramControl.
     */
    public ProgramControl() {
        dao = new ProgramDao(Persistence.createEntityManagerFactory("TPPU"));
    }

    /**
     * Leer todos los Program.
     *
     * @return Lista con todos los Program.
     */
    public Collection<Program> readAll() {
        return dao.readAll();
    }
}
